package ru.spb.nicetu.schoolproject.data;

import javax.persistence.*;

/**
 * Created by dchernyshov on 09.04.15.
 */
@Entity
@Table( name = "school_schema.subjects")
public class Subject {
    @Id
    @Column (name = "id")
    private int subjectId;
    @Column (name = "name")
    private String name;

    public Subject() {}

    public int getSubjectId() {
        return subjectId;
    }

    public void setSubjectId(int subjectId) {
        this.subjectId = subjectId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return name.trim();
    }
}
